# Contributor: Duncan Bellamy <dunk@denkimushi.com>
maintainer="Duncan Bellamy <dunk@denkimushi.com>"
pkgname=py3-durationpy
pkgver=0.9
pkgrel=0
pkgdesc="Module for converting between datetime.timedelta and Go's Duration strings"
url="https://github.com/icholy/durationpy"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/icholy/durationpy/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/durationpy-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 test.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
701b5dd725a2d7c42aae1e1edbfbb9756a451a25f9bf772a20295533f5cb2359ee24f1f778ebaa53885c9e44606f9b2320093c6311ac7c3d4a7534483c033063  py3-durationpy-0.9.tar.gz
"
